package com.snow.demo.spring.factorybean;

import com.snow.demo.spring.entity.DemoBean;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author -J
 * @since 2024/1/20 19:59
 */
public class DemoBeanFactoryBean implements FactoryBean<DemoBean> {


    @Override
    public DemoBean getObject() throws Exception {
		DemoBean demoBean = new DemoBean();
		demoBean.setName("factoryBeanCreate");
		return demoBean;
    }

    @Override
    public Class<?> getObjectType() {
        return DemoBean.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
